﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

using Eforcity.Common35;

namespace ConsoleGetOrdersEbay
{
    public class AppSettings
    {
        #region Connection String Settings
        public static ConnectionStringSettings EpacketDBConn
        {
            get { return ConfigurationManager.ConnectionStrings["EpacketDBConn"]; }
        }
        public static ConnectionStringSettings EbayApiDbConn
        {
            get { return ConfigurationManager.ConnectionStrings["EbayApiDbConn"]; }
        }
        public static ConnectionStringSettings ShippingLabel
        {
            get { return ConfigurationManager.ConnectionStrings["ShippingLabel"]; }
        }
        #endregion

        #region Input Parameters Settings
        public static string EbayApiEndPoint
        {
            get { return ConvertUtility.Trim(ConfigurationManager.AppSettings["EbayApiEndPoint"]); }
        }

        public static int EbayApiMaxRetry
        {
            get { return ConvertUtility.ToInt(ConfigurationManager.AppSettings["EbayApiMaxRetry"]); }
        }

        public static int EbaySessionCallLimit
        {
            get { return ConvertUtility.ToInt(ConfigurationManager.AppSettings["EbaySessionCallLimit"]); }
        }

        public static int EbayMinCallAvail
        {
            get { return ConvertUtility.ToInt(ConfigurationManager.AppSettings["EbayMinCallAvail"]); }
        }

        public static int ApiSleepTime
        {
            get { return Convert.ToInt32(ConfigurationManager.AppSettings["ApiSleepTime"]) * 60 * 1000; }
        }

        public static int IdleSleepTime
        {
            get { return Convert.ToInt32(ConfigurationManager.AppSettings["IdleSleepTime"]); }
        }

        #endregion
    }
}
